package com.rocksea.checkservice;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by Mrw on 2017/8/19.
 *
 */

public class DBHelper extends SQLiteOpenHelper {

    private static final int DATABASE_VERSION = 1;

    public DBHelper(Context context, String databaseName)
    {
        super(context, databaseName, null, DATABASE_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db)
    {
        db.execSQL("CREATE TABLE if not exists Service(uuid TEXT,basicInfoId INTEGER PRIMARY KEY AUTOINCREMENT,ServerIp TEXT, DtuPort TEXT, RegionName TEXT, WebIp TEXT, WebPort TEXT, Flag INTEGER, WebFlag INTEGER, Province TEXT, TransferFlag INTEGER,isValid INTEGER)");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
